import request from "@/utils/request";

// 获取答题配置管理列表
export function getList(data) {
  return request({
    url: "/api/exam/practice/getList",
    method: "post",
    data,
  });
}
// 获取答题配置管理
export function getInfo(id) {
  return request({
    url: `/api/exam/practice/${id}`,
    method: "get",
  });
}
// 获取答题配置管理详情
export function getDetail(id) {
  return request({
    url: `/api/exam/practice/detail/${id}`,
    method: "get",
  });
}
// 删除答题配置管理
export function Delete(id) {
  return request({
    url: `/api/exam/practice/${id}`,
    method: "DELETE",
  });
}
// 修改答题配置管理
export function Update(data) {
  return request({
    url: `/api/exam/practice/${data.id}`,
    method: "PUT",
    data,
  });
}
// 新建答题配置管理
export function Create(data) {
  return request({
    url: "/api/exam/practice",
    method: "post",
    data,
  });
}

// 获取答题配置
export function getConfig() {
  return request({
    url: `/api/exam/practice/config`,
    method: "get",
  });
}
// 获取兴趣答题的配置 开放标签
export function getQuestionLabels() {
  return request({
    url: `/api/exam/practice/getLabels`,
    method: "get",
  });
}
// 获取当前用户可见的答题配置题库
export function listByCurrentUser() {
  return request({
    url: `/api/exam/practice/listByCurrentUser`,
    method: "get",
  });
}
// 获取当前登录人答题练习可见范围的题库目录
export function categorySelector(id) {
  return request({
    url: `/api/exam/practice/categorySelector`,
    method: "get",
  });
}
